home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / pdcurs21.zip / PRIVATE.ZIP / _SET8025.C < prev    next >
Text File  |  1992-11-21  |  2KB  |  72 lines

  1. #define        CURSES_LIBRARY  1
  2. #include <curses.h>
  3.  
  4. #ifndef NDEBUG
  5. char *rcsid__set8025 = "$Header: c:/curses/private/RCS/_set8025.c%v 2.0 1992/11/15 03:24:35 MH Rel $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. /*man-start*********************************************************************
  12.  
  13.   PDC_set_80x25()      - force a known screen state: 80x25 text mode.
  14.  
  15.   PDCurses Description:
  16.        This is a private PDCurses function.
  17.  
  18.        Forces the appropriate 80x25 alpha mode given the display adapter.
  19.  
  20.        Since we currently do not support changing the virtual console size,
  21.        this routine is a NOP under Flexos.
  22.  
  23.   PDCurses Return Value:
  24.        This function returns OK upon success otherwise ERR is returned.
  25.  
  26.   PDCurses Errors:
  27.        No errors are defined for this routine.
  28.  
  29.   Portability:
  30.        PDCurses        int     PDC_set_80x25( void );
  31.  
  32. **man-end**********************************************************************/
  33.  
  34. int    PDC_set_80x25(void)
  35. {
  36. #ifdef FLEXOS
  37.        return( OK );
  38. #endif
  39. #ifdef DOS
  40.        switch (_cursvar.adapter)
  41.        {
  42.        case _CGA:
  43.        case _EGACOLOR:
  44.        case _EGAMONO:
  45.        case _VGACOLOR:
  46.        case _VGAMONO:
  47.        case _MCGACOLOR:
  48.        case _MCGAMONO:
  49.                regs.h.ah = 0x00;
  50.                regs.h.al = 0x03;
  51.                int86(0x10, ®s, ®s);
  52.                break;
  53.        case _MDA:
  54.                regs.h.ah = 0x00;
  55.                regs.h.al = 0x07;
  56.                int86(0x10, ®s, ®s);
  57.        default:
  58.                break;
  59.        }
  60.        return( OK );
  61. #endif
  62. #ifdef OS2
  63.        VIOMODEINFO modeInfo;
  64.  
  65.        modeInfo.cb = sizeof(modeInfo);
  66.        /* set most parameters of modeInfo */
  67.        VioGetMode(&modeInfo, 0);
  68.        modeInfo.fbType = 1;
  69.        VioSetMode(&modeInfo, 0);
  70. #endif
  71. }
  72.